//当前子reducer函数只管理count这个数字
export default function reducer(state: any = '', action: any) {
    const { type, data } = action
    //判断
    if (type === 'CHANGE') {
        state = data
    }
    if (type === 'DELID') {
        state = ''
    }
    //返回一个全新的state
    return state;
}